<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>我的待诊</title>
    <link rel="stylesheet" href="/static/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/static/css/public.css" media="all" />
    <style>
        .top-panel {
            border: 1px solid #eceff9;
            border-radius: 5px;
            text-align: center;
        }
        .top-panel > .layui-card-body{
            height: 60px;
        }
        .top-panel-number{
            line-height:60px;
            font-size: 30px;
            text-align: center;

        }
    </style>
</head>
<body class="childrenBody" style="background-color: #eeeeee">
<div class="layui-row layui-col-space15">
    <div class="layui-col-xs12 layui-col-md4 layui-col-md-offset4">

        <div class="layui-card top-panel" style="height: 200px">
            <div class="layui-card-header">我的预约时间<span style="color: #ccc" id="regTime">1</span></div>
            <div class="layui-card-body">
                <div class="layui-row layui-col-space5">
                    <div class="layui-col-xs9 layui-col-md8 layui-col-md-offset2 top-panel-number">
                        我的预约码<span style="color: #00FF00" id="myCode">0</span><br>
                        还需等待<span style="color: orange" id="waitNum">0</span>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>
</body>
<script type="text/javascript" src="/static/layui/layui.js"></script>
<script>
    layui.use(['jquery'],function () {
        var $ = layui.jquery;


        $.ajax({
            url:'/registration/previousNumber',
            type:'GET',
            success:function (res) {
                console.log(res.data)
                $('#regTime').html(res.data.registration.date);
                $('#waitNum').html(res.data.count);
                $('#myCode').html(res.data.registration.id);
            }
        })
    })
</script>